chore: migrate tests to Rstest#49
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughTest execution was migrated to RsTest with separate unit and E2E projects. Package scripts and development dependencies were updated, the RsTest package scope was added to workspace release-age exclusions, and the Playwright test now imports its APIs from 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/index.pw.test.ts`:
- Line 4: The test currently mixes Rstest with Playwright’s locator assertion
style. Update the assertions in the test cases to use Rstest’s
expect.element(locator) API, or replace the imports with native Playwright test
utilities if retaining toHaveText semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a0ffe876-1cbe-41c2-b6c8-d58b3dce7a0e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
package.jsonpnpm-workspace.yamltest/index.pw.test.tstest/playwright.config.tstest/rstest.config.ts
💤 Files with no reviewable changes (1)
- test/playwright.config.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f6e2110e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| NODE_ENV: undefined, | ||
| }, | ||
| retry: process.env.CI ? 3 : 0, | ||
| testTimeout: 10_000, |
There was a problem hiding this comment.
Preserve the e2e timeout budget
In the GitHub Actions test matrix (.github/workflows/test.yml), pnpm run test now runs test/e2e.test.ts, which starts pnpm run dev, waits for the dev server, navigates, and asserts the page. This 10s Rstest per-test cap is much lower than the previous Playwright Test default of 30s, so slower CI runs—especially Windows—can time out before the app is ready. Rstest documents testTimeout as the default test timeout (https://rstest.rs/config/test/test-timeout), while Playwright documents the previous default as 30_000ms (https://playwright.dev/docs/test-timeouts); please keep the e2e timeout at least as large as before or set it only on the e2e test.
Useful? React with 👍 / 👎.
This PR migrates the E2E test runner from
@playwright/testto Rstest so the repository uses the Rstack testing workflow while retaining Playwright browser automation. It adds@rstest/playwright, preserves the existing test coverage, and keeps Rsbuild's build and development modes unchanged.Related Links